#include "qbullet.h"

QBullet::QBullet(const QString & fileName,QGraphicsScene *scence,qreal angle):QpimapItem(fileName,scence)
{
    qreal dx,dy;
    qreal rad;
    rad=angle*3.14/180;
    dx=100*cos(rad);
    dy=100*sin(rad);

    this->setPos(scence->width()/2+dx,scence->height()-dy);
    this->setRotation(90-angle);

}

void QBullet::advance(int phase)
{
    this->setPos(mapToScene(0,-5));
}

